#!/bin/sh
#
# Startup script for psad
#
# chkconfig: 345 99 05
# description: The Port Scan Attack Detector (psad)
# processname: psad
# pidfile: /var/run/psad.pid
# config: /etc/psad/psad.conf
#

restart() {
    $0 stop
    $0 start
}

# See how we were called.
case "$1" in
start)
    echo -n "Starting Fuse"
    ### psad enables signature matching and auto
    ### danger level assignment by default, so
    ### command line args are not necessary here.
    modprobe fuse
    mount -a
    echo
    ;;
stop)
    rmmod fuse
    ;;
status)
    lsmod | grep fuse
    ;;
restart)
    restart
    ;;
*)
    echo "Usage: psad {start|stop|status|restart}"
    exit 1
esac
